MentionSpan

class MentionSpan @JvmOverloads constructor(    context: Context,     mentionType: MentionType = MentionType.USERS,     val trigger: String,     val value: String,     val mentionedUser: User,     uiConfig: TextUIConfig,     mentionedCurrentUserUIConfig: TextUIConfig? = null) : MetricAffectingSpan

The text with a MentionSpan attached will be bold and clickable. MentionSpan provides the User data that is relevant to the marked-up text.

Since

3.0.0

Constructors

Link copied to clipboard
fun MentionSpan(    context: Context,     trigger: String,     value: String,     mentionedUser: User,     uiConfig: TextUIConfig,     mentionedCurrentUserUIConfig: TextUIConfig?)

Constructor

Link copied to clipboard
fun MentionSpan(    context: Context,     mentionType: MentionType = MentionType.USERS,     trigger: String,     value: String,     mentionedUser: User,     uiConfig: TextUIConfig,     mentionedCurrentUserUIConfig: TextUIConfig? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun updateDrawState(paint: TextPaint)
Link copied to clipboard
open override fun updateMeasureState(paint: TextPaint)

Properties

Link copied to clipboard
val displayText: String
Link copied to clipboard
val length: Int

Returns the length of the text to be displayed.

Link copied to clipboard
val mentionedUser: User

Returns the User relevant to this spanned text

Link copied to clipboard
val templateText: String
Link copied to clipboard
val trigger: String

Returns the trigger text.

Link copied to clipboard
val value: String

Returns the mentioned text.